home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr22 / gnplt.zip / RANDOM.DEM < prev    next >
Text File  |  1993-05-11  |  950b  |  38 lines

  1. #
  2. # $Id: random.demo 3.38.2.32 1992/12/04 18:33:59 woo Exp $
  3. #
  4. # random.dem
  5. #
  6. # Lattice test for random numbers;
  7. # If you can see any patterns in this plot, the random number generator
  8. # is not very good.
  9. #
  10. # Permission granted to distribute freely for non-commercial purposes only
  11. #
  12. # Copyright (c) 1991, Jos van der Woude, jvdwoude@hut.nl
  13. save set "defaults.ini"
  14. seed = 1317
  15. seed = rand(seed)
  16. set nokey
  17. set xrange [0: 1]
  18. set yrange [0: 1]
  19. set zrange [0: 1]
  20. set title "Lattice test for random numbers"
  21. set xlabel "rand(n) ->"
  22. set ylabel "rand(n + 1) ->"
  23. set zlabel "rand(n + 2) ->"
  24. set format x "%3.2f"
  25. set format y "%3.2f"
  26. set format z "%3.2f"
  27. set tics
  28. set sample 1000
  29. set function style dots
  30. set parametric
  31. plot rand(1), rand(1)
  32. pause -1 "Hit return to continue"
  33. pause 0 "3D plot ahead, one moment please ..."
  34. set sample 50
  35. splot rand(1), rand(1), rand(1)
  36. pause -1 "Hit return to continue"
  37. load "defaults.ini"
  38.